package com.kaili.pojo.dto.stowage;


import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author xjh
 * @ClassName StowageAddBean
 * @Description 配载新增实体类
 * @Date 下午1:32 18-5-24
 * @Version 1.0
 */
@Data
public class StowageAddDTO {
    @Pattern(regexp = "^[0-9]{0,19}$",message = "配载单流水号应为[0-9]组成的1-19位字符")
    @ApiModelProperty("配载单流水号")
    private String operationId;

    @Pattern(regexp = "^[A-Za-z0-9]{0,30}$",message = "配载单号应为[A-Za-z0-9]组成的1-30位字符")
    @ApiModelProperty("配载单号")
    private String stowageNo;

    @ApiModelProperty("配载单制作网点id")
    private Integer siteId;

    @ApiModelProperty("发车时间")
    private Date carSendTime;

    @NotNull(message = "目的网点id不能为空")
    @ApiModelProperty("目的网点id")
    private Integer destinationSiteId;

    @NotNull(message = "车辆id不能为空")
    @ApiModelProperty("车辆id")
    private Integer carId;

    @NotNull(message = "驾驶员id不能为空")
    @ApiModelProperty("驾驶员id")
    private Integer driverId;

    @NotNull(message = "手机号不能不能为空")
    @ApiModelProperty("手机号")
    private String phone;

    @ApiModelProperty("途径网点")
    private Integer nextSiteId;

    @NotNull(message = "出站配载票数不能为空")
    @ApiModelProperty("出站配载票数")
    private Integer outEwbCount;

    @NotNull(message = "出站配载件数不能为空")
    @ApiModelProperty("出站配载件数")
    private Integer outPiece;

    @NotNull(message = "出站扫描件数不能为空")
    @ApiModelProperty("出站扫描件数")
    private Integer outScanPiece;

    @NotNull(message = "出站配载重量不能为空")
    @ApiModelProperty("出站配载重量")
    private BigDecimal outWeight;

    @NotNull(message = "出站配载体积不能为空")
    @ApiModelProperty("出站配载体积")
    private BigDecimal outVol;

    @Length(min=0,max=100,message = "备注长度在[0,100]之间")
    @ApiModelProperty("备注")
    private String remark;

    @NotNull(message = "承运费不能为空")
    @ApiModelProperty("承运费")
    private BigDecimal carryFreightCharge;

    @NotNull(message = "结算方式不能为空")
    @ApiModelProperty("结算方式")
    private Integer payModeId;

    @ApiModelProperty("设备编号")
    private String deviceCode;

    @NotNull(message = "数据来源不能为空")
    @ApiModelProperty("数据来源 1:PC 2:pda")
    private Integer scanSourceId;

    @NotNull(message = "短途接驳不能为空")
    @ApiModelProperty("是否短途接驳  0不是  1是")
    private Integer shortRelay;

    @ApiModelProperty("配载单明细集合")
    private List<StowageDetailAddBean> ewbsStowageDetailList;

    @ApiModelProperty("配载单制作人id")
    private Integer userId;

}
